package com.openbravo.pos.ticket;

import com.openbravo.basic.BasicException;
import com.openbravo.data.loader.Vectorer;
import com.openbravo.format.Formats;
import com.openbravo.pos.forms.AppLocal;

public class ProductVectorer
  implements Vectorer
{
  private static String[] m_sHeaders = { AppLocal.getIntString("label.prodref"), AppLocal.getIntString("label.prodbarcode"), AppLocal.getIntString("label.prodname"), AppLocal.getIntString("label.prodpricebuy"), AppLocal.getIntString("label.prodpricesell") };

  public String[] getHeaders()
    throws BasicException
  {
    return m_sHeaders;
  }

  public String[] getValues(Object paramObject)
    throws BasicException
  {
    ProductInfoExt localProductInfoExt = (ProductInfoExt)paramObject;
    String[] arrayOfString = new String[5];
    arrayOfString[0] = Formats.STRING.formatValue(localProductInfoExt.getReference());
    arrayOfString[1] = Formats.STRING.formatValue(localProductInfoExt.getCode());
    arrayOfString[2] = Formats.STRING.formatValue(localProductInfoExt.getName());
    arrayOfString[3] = Formats.CURRENCY.formatValue(new Double(localProductInfoExt.getPriceBuy()));
    arrayOfString[4] = Formats.CURRENCY.formatValue(new Double(localProductInfoExt.getPriceSell()));
    return arrayOfString;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.ticket.ProductVectorer
 * JD-Core Version:    0.6.0
 */